﻿package org.sky.common.web.action;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;

/**
 * 功能：异常处理
 * @author 
 *
 * mobile enterprise application platform
 * Version 0.1
 */
public class ExcptHandlerExceptionResolver extends SimpleMappingExceptionResolver {
	Logger log = LoggerFactory.getLogger(ExcptHandlerExceptionResolver.class); 
	protected ModelAndView doResolveException(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, Object o, Exception e) {
	        httpServletRequest.setAttribute("ex", e);
	        log.error(e.getMessage(),e);
	        return super.doResolveException(httpServletRequest, httpServletResponse, o, e);
	    }
}
